import request from '@/utils/request'

// 查询宿舍信息列表
export function listDormitory_info(query) {
  return request({
    url: '/zsw/dormitory_info/list',
    method: 'get',
    params: query
  })
}

export function dnlist(){
  return request({
    url: 'zsw/dormitory_info/dnlist',
    method: 'get'
  })
}

// 查询宿舍信息详细
export function getDormitory_info(dormitoryId) {
  return request({
    url: '/zsw/dormitory_info/' + dormitoryId,
    method: 'get'
  })
}

export function findstudentbystudentNumber(studentNumber){
  return request({
    url: '/zsw/dormitory_info/getstudent/'+ studentNumber,
    method: 'get'
  })
}


// 新增宿舍信息
export function addDormitory_info(data) {
  return request({
    url: '/zsw/dormitory_info',
    method: 'post',
    data: data
  })
}

// 修改宿舍信息
export function updateDormitory_info(data) {
  return request({
    url: '/zsw/dormitory_info',
    method: 'put',
    data: data
  })
}

// 删除宿舍信息
export function delDormitory_info(dormitoryId) {
  return request({
    url: '/zsw/dormitory_info/' + dormitoryId,
    method: 'delete'
  })
}

export function delindormitory(studentIds){
  return request({
    url: '/zsw/dormitory_info/delindormitory/'+studentIds,
    method: 'post'
  })
}